<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
            list-style: none;
        }
        body{
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, .3);
        }
        .main{
            width: 1200px;
            height: 600px;
            background-color: white;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            display: flex;
            flex-wrap: wrap;
            /* position: relative; */
        }

        /* 左边 */
        .left{
            width: 595px;
            height: 520px;
            display: flex;
           flex-direction: column;
        }
        .head img{
            width: 150px;
            height: 50px;
            margin-top: 25px;
            margin-left: 40px;
        }
        .middle{
            display: flex;

        }
        .first{
            width: 240px;
            height: 240px;
            border: 1px solid #eee;
            margin-top: 55px;
            margin-left: 45px;
        }
        .first img{
            width: 210px;
            height: 210px;
            margin-top: 15px;
            margin-left: 15px;
        }
        .second{
            width: 200px;
            height: 220px;
            margin-top: 55px;
            margin-left: 45px;
        }
        .third{
            font-size: 24px;
            text-align: center;
            margin-top: 20px;
        }
        .fourth .mi{
            width: 212px;
            height: 46px;
            background-color: #f5f5f6;
            border-radius: 15px;
            margin-left: 190px;
            margin-top: 20px;
            display: flex;
        }
        .fourth p img{
            width: 30px;
            height: 30px;
            margin-top: 8px;
            margin-left: 25px;
        }
        .fourth p a{
            text-decoration: none;
            font-size: 20px;
            color: #4e6ef2;
            display: inline-block;
            height: 46px;
            line-height: 46px;
            margin-left: 5px;
        }

        /* 右边 */
        .right{
            width: 604px;
            height: 473px;
            margin-top: 47px;
            border-left: 1px solid #eee;
        }
        .right-first{
            display: flex;
        }
        .right-first li{
            width: 120px;
            height: 50px;
            font-size: 30px;
            color: #909090;
            margin-left: 50px;
            position: relative;
        }
        .right-first li span.on{
            display: inline-block;
            width: 108px;
            height: 3px;
            background-color: #4e6ef2;
            position: absolute;
            top: 50px;
            left: 5px;
        }
        .right-second{
            width: 505px;
            height: 265px;
            margin-left: 50px;
            margin-top: 15px;
            display: none;
        }
        .right-second li:nth-child(1){
            font-size: 16px;
            color: #858585;
        }
        .right-second li input{
            width: 503px;
            height: 70px;
            border-radius: 10px;
            border: 1px solid #858585;
            outline: none;
            text-indent: 1em;
            margin-top: 20px;
            position: relative;
        }
        .right-second li a{
            display: inline-block;
            width: 150px;
            height: 30px;
            border-left: 1px solid #eee;
            text-decoration: none;
            font-size: 24px;
            color: #4e6ef2;
            text-align: center;
            position: absolute;
            top: 265px;
            right: 50px;
        }


        .right-third{
            width: 505px;
            height: 265px;
            margin-left: 50px;
            margin-top: 15px;
            display: none;
        }
        .right-third li input{
            width: 503px;
            height: 70px;
            border-radius: 10px;
            border: 1px solid #858585;
            outline: none;
            text-indent: 1em;
            margin-top: 20px;
        }
        .right-third li:nth-child(3){
            text-align: right;
            margin-top: 30px;
        }
        .right-third li a{
            display: inline-block;
            text-decoration: none;
            font-size: 14px;
            color: #4e6ef2;
            text-align: center;
            
        }
        button{
            width: 505px;
            height: 70px;
            margin-left: 50px;
            border: none;
            border-radius: 15px;
            background-color: #4e6ef2;
            color: white;
            font-size: 24px;
            font-weight: bold;
        }
        .bug{
            text-align: center;
            font-size: 20px;
            color: #999;
            margin-top: 25px;
        }
        .bug a{
            text-decoration: none;
            color: #4e6ef2;
        }

        .box ul.active{
            display: block;
            color: #222;
        }
        

        /* 尾部 */
        .footer{
            width: 1200px;
            height: 79px;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid #eee;
        }
        .footer ul{
            display: flex;

        }
        .footer ul li{
            margin-top: 22px;
            margin-left: 48px;
        }
        .footer ul li img{
            width: 40px;
            height: 40px;
        }
        .ez{
            margin-right: 40px;
            margin-top: 30px;
        }
        .ez a{
            text-decoration: none;
            color: #4e6ef2;
            font-size: 18px;
        }


        .boxy{
            width: 500px;
            height: 400px;
            box-shadow: 1px 1px 1px 1px black;
            position: absolute;
            top: 25px;
            left: 40px;
            background-color: #fff;
            display: none;
        }
        .imgy{
            width: 240px;
            height: 240px;
            border: 1px solid #eee;
            margin-top: 50px;
            margin-left: 130px;
        }
        .imgy img{
            width: 200px;
            height: 200px;
            margin-top:20px;
            margin-left: 20px;
        }
        .content{
            margin-top: 25px;
            text-align: center;
            font-size: 24px;
           
        }
    </style>
</head>
<body>
    <div class="main">
        <div class="left">
            <p class="head"><img src="../img/newloginlogo.png" alt=""></p>
            <div class="middle">
                <div class="first"><img src="../img/qrcode.png" alt=""></div>
                <img src="../img/smdl.png" alt="" class="second">
            </div>
            <p class="third">请使用百度APP扫码登录</p>

            <div class="boxy">
                <div class="imgy"><img src="../img/qrcode.png" alt=""></div>
                <p class="content">扫描二维码下载百度APP</p>
            </div>
            <div class="fourth">
                <p class="mi">
                    <img src="../img/baidu-download-icon.png" alt="">
                    <a href="">下载百度APP</a>
                </p>
            </div>    
        </div>
        <div class="right">
            <div class="box">
            <ul class="right-first">
                <li>
                    账号登录
                    <span></span>
                </li>
                <li>
                    短信登录
                    <span class="on"></span>
                </li>
            </ul>

            <div class="boxs">
                <ul class="right-third">
                    <li><input type="text" placeholder="手机号/用户名/邮箱"></li>
                    <li><input type="password" placeholder="密码"></li>
                    <li><a href="">忘记密码?</a></li>
                </ul>

            <ul class="right-second active">
                <li>验证及登录，未注册将自动创建百度账号</li>
                <li><input type="tel" placeholder="请输入手机号"></li>
                <li><input type="text" placeholder="验证码"><a href="">发送验证码</a></li>
            </ul>


            
        </div>
            <button>登录</button>
            <p class="bug">阅读并接受<a href="">百度用户协议</a>和<a href="">隐私政策</a></p>
        </div>
        </div>

        <!-- 尾部 -->
        <div class="footer">
             <ul class="footer-left">
                <li><a href=""><img src="../img/qq.png" alt=""></a></li>
                <li><a href=""><img src="../img/wb.png" alt=""></a></li>
                <li><a href=""><img src="../img/wx.png" alt=""></a></li>
             </ul>
             <p class="ez"><a href="">立即注册</a></p>
        </div>
    </div>



    <script>
        let lis=document.querySelectorAll(".right-first li")
        let sp=document.querySelectorAll(".right-first li span")
        let uls=document.querySelectorAll(".boxs ul")
        let p=document.querySelector(".mi")
        let div=document.querySelector(".boxy")
        console.log(lis,sp,uls,p,div);
        lis.forEach(function(v,i){
            v.addEventListener("click",function(){
                for (let i = 0; i < lis.length; i++) {
                    sp[i].classList.remove("on")
                   uls[i].classList.remove("active")
                    
                }
                // sp[0].classList.remove("on")
                // sp[0].classList.remove("on")
                sp[i].classList.add("on")
                uls[i].classList.add("active")
            })
        })

        p.addEventListener("mouseover",function(){
            div.style.display="block"
        })
        p.addEventListener("mouseout",function(){
            div.style.display="none"
        })
    </script>
</body>
</html>